<template>
  <div class="goods-desc">
    <my-header outerTitle="图文介绍"></my-header>
    <h3 class="desc-title">{{descInfo.title}}</h3>
    <div class="desc-content" v-html="descInfo.content"></div>
  </div>
</template>
<script>
import { getDesc } from '@/api'
import myHeader from '@/components/myHeader'
export default {
  components: {
    myHeader
  },
  data () {
    return {
      descInfo: {}
    }
  },
  created () {
    this.initDesc()
  },
  methods: {
    initDesc () {
      getDesc(this.$route.params.id)
        .then(res => {
          console.log(res)
          this.descInfo = res.message[0]
        })
    }
  }
}
</script>
<style lang="scss" scoped>
  img {
    display: block;
}

.goods-desc {
  margin-top: 50px;
  h3 {
    font-weight: bold;
    color: #26a2ff;
    font-size: 16px;
    margin-bottom: 5px;
  }
  .desc-content {
    font-size: 14px;
  }
}
</style>
